import { computed, ref } from 'vue'
export default function () {
  const counter = ref(0)
  const doubleCounter = computed(() => { return counter.value * 2 })

  const add = () => {
    counter.value++
  }
  const minus = () => {
    counter.value--
  }

  return {
    counter,
    doubleCounter,
    add,
    minus
  }
}